﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AVIS.OutBound.WizardAgent
{
    /// <summary>
    /// 套餐价格包含的详细内容（行驶限制、保险项目、费用）
    /// </summary>
    /// <remarks>
    /// XML解析的原理
    ///     1. 在PricedCoverages
    ///         IncludedInRate=true，且Amount=0，将Description放在价格包含部分
    ///     2.是否有Unlimited mileage，找到RateDistance 节  且Unlimited为true，则显示“Unlimited Mileage/kilometers”
    ///     3.是否有Tax和Location surcharge， 找到VehicleCharge节，遍历Description是否有包含"Local Tax"的，有则分2行显示“Tax”，“Location surcharge”
    ///     4.是否有One-way fee，找到VehicleCharge节，遍历Description是否有包含"One way fee"的，且IncludedInRate=true，则显示“One Way Fee”
    ///     5.VehicleCharge节点下 IncludedInRate=true 且Purpose不等于1，取Description值加入到价格包含中
    /// </remarks>
    public class PriceIncludeDto
    {
        /// <summary>
        /// 行驶里程限制
        /// </summary>
        public PriceIncludeDistanceDto Distance { get; set; }

        /// <summary>
        /// 包含的保险项目
        /// </summary>
        public List<PriceIncludeCoverageDto> Coverages { get; set; }

        /// <summary>
        /// 包含的费用
        /// </summary>
        public List<string> VehicleCharges { get; set; }

        public PriceIncludeDto()
        {
            Distance = new PriceIncludeDistanceDto();
            Coverages = new List<PriceIncludeCoverageDto>();
            VehicleCharges = new List<string>();
        }
    }
}
